package com.cyz.service;

import java.sql.SQLException;
import java.util.List;

import com.cyz.pojo.Shopcart;

public interface ShopcartService {
	/**
	 * ͨ���û�ID����ȡ���Ĺ��ﳵ��Ϣ
	 * @param UseId
	 * @return
	 * @throws SQLException
	 */
	public List<Shopcart> getShopcartByUseId(Integer useId)throws SQLException ;
	/**
	 * ��ǰ��Ʒ���빺�ﳵ
	 * @param userId
	 * @param productId
	 * @param amount
	 * @param price
	 * @throws SQLException
	 */
	public void insertShopcart(Integer userId,Integer productId,Integer amount,float price)throws Exception;
	
	/**
	  *  删除购物车记录
	 * @param userName �û���
	 * @param productName ��Ʒ�� 
	 */
	public void deteleShopcart(String userName,String productName);
	public void updateShopcart(Integer userId,Integer productId,Integer amount);
	/**
	 * 清空该用户购物车
	 * @param userName
	 * @param productName
	 */
	public void deteleAllShopcart(Integer userId);
}
